﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="d" uri="/WEB-INF/resource.tld" %>

<fmt:setBundle basename="ApplicationMessage" />
<fmt:setLocale value="zh_CN" />

<!DOCTYPE html>
<html lang="zh-CN">
<head>

  <%@ include file="/WEB-INF/include/meta.jsp"%>
  <%@ include file="/WEB-INF/include/css.jsp"%>
  
</head>

<body>

  <%@ include file="/WEB-INF/include/header.jsp"%>
  
  <%@ include file="/WEB-INF/include/menu.jsp"%>
  
  <div class="container main-content">

    <div class="panel panel-default x-panel x-panel-layout">

      <div class="panel-heading">
        <ol class="breadcrumb">
          <li><a href="${ctx.host}/online-rounds">课程管理</a></li>
          <li class="active">课件管理</li>
          <li class="no-before pull-right" style="min-width: 65px;">
            <a onclick="window.history.back();"><i class="glyphicon glyphicon-arrow-left"></i>&nbsp;&nbsp;返回</a>
          </li>
        </ol>
      </div>

      <div class="panel-body">

        <div class="col-xs-2 x-panel-layout-left no-horizontal-padding">
          <%@ include file="/WEB-INF/include/submenu.jsp"%>
        </div>

        <div class="col-xs-10 x-panel-layout-right">

          <div class="x-breadcrumb-wrapper">
            <div class="x-breadcrumb clearfix">
              <h2><i class="glyphicon glyphicon-fire" title="分组模板详情"></i>&nbsp;&nbsp;<span>分组管理&nbsp;-&nbsp;详情</span></h2>
            </div>
          </div>
          
          <div class="x-breadcrumb-wrapper top-margin-20" style="position: relative;">
            <ul class="nav nav-pills x-breadcrumb-nav">
              <li class="pull-left active"><a href="${ctx.host}/fitness-groups/${fitnessGroup.id}">基本信息</a></li>
              <c:if test="${fitnessGroup.type.online or fitnessGroup.type.offline}">
                <li class="pull-left"><a href="${ctx.host}/fitness-groups/${fitnessGroup.id}/batch-courseware-templates/1?type=weekly">${fitnessGroup.type.online ? '每周课件' : '家庭作业'}</a></li>
              </c:if>
              <c:if test="${fitnessGroup.type.offline}">
                <li  class="pull-left"><a href="${ctx.host}/fitness-groups/${fitnessGroup.id}/batch-courseware-templates/1?type=course&day=1">上课课件</a></li>
              </c:if>
              <c:if test="${fitnessGroup.type.specialty}">
                <li class="pull-left"><a href="${ctx.host}/fitness-groups/${fitnessGroup.id}/special-courseware-templates">上课课件</a></li>
              </c:if>
              <c:if test="${currentPrincipal.coursewareManager}">
                <div class="pull-right" style="margin-top:10px;">
                  <a href="${ctx.host}/fitness-groups/${fitnessGroup.id}/edit" data-target="#info-edit" data-toggle="modal" title="编辑">编辑</a>
                </div>
              </c:if>
            </ul>
            
              <div class="clearlfix">
            
                <div class="form-horizontal x-form-horizontal">
                  <div class="form-group">
                    <label class="control-label col-xs-2 text-right">名称：</label>
                    <div class="col-xs-3">
                      <p class="form-control-static">${fitnessGroup.name}</p>
                    </div>
                    <c:if test="${!fitnessGroup.type.specialty}">
                      <label class="control-label col-xs-2 text-right">类型：</label>
                      <div class="col-xs-3">
                        <p class="form-control-static">${fitnessGroup.type.description}</p>
                      </div>
                    </c:if>
                  </div>
                  <div class="form-group">
                    <c:if test="${!fitnessGroup.type.specialty}">
                      <label class="control-label col-xs-2 text-right">所属课程：</label>
                      <div class="col-xs-3">
                        <p class="form-control-static">${fitnessGroup.course.name}</p>
                      </div>
                    </c:if>
                    <label class="control-label col-xs-2 text-right">描述：</label>
                    <div class="col-xs-3">
                      <p class="form-control-static">${fitnessGroup.summary}</p>
                    </div>
                  </div>
                  <c:if test="${!fitnessGroup.type.specialty}">
                    <div class="form-group">
                      <label class="control-label col-xs-2 text-right">周数：</label>
                      <div class="col-xs-3">
                        <p class="form-control-static">${fitnessGroup.weeks}</p>
                      </div>
                      <label class="control-label col-xs-2 text-right">课时：</label>
                      <div class="col-xs-3">
                        <p class="form-control-static">${fitnessGroup.hours}</p>
                      </div>
                    </div>
                  </c:if>
                  <div class="form-group">
                    <label class="control-label col-xs-2 text-right">创建时间：</label>
                    <div class="col-xs-3">
                      <p class="form-control-static"><fmt:formatDate value="${fitnessGroup.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></p>
                    </div>
                    <label class="control-label col-xs-2 text-right">修改时间：</label>
                    <div class="col-xs-3">
                    <p class="form-control-static"><fmt:formatDate value="${fitnessGroup.updateTime}" pattern="yyyy-MM-dd HH:mm:ss"/></p>
                    </div>
                  </div>
               </div>
             </div>
             
          </div>
          
        </div>
          
      </div>

    </div>

  </div>

  <%@ include file="/WEB-INF/include/script.jsp"%>
  <d:resource root="${ctx.resource}/build" type="script" src="js/page/courseware/fitness-group-view.js">
    <script type="text/javascript">
      require(['page/courseware/fitness-group-view'], function(page) {
        page.init()
      })
    </script>
  </d:resource>
  
</body>

</html>
